Release 10.1A: OpenEdge Application Server:
Developing WebSpeed Applications
Directing DISPLAY output
Like all SpeedScript output statements, the
DISPLAYstatement always directs output to a particular stream. In WebSpeed, this output stream must also be directed to the“WEB”device (your Web server). WebSpeed provides two ways to directDISPLAYoutput to a stream:In general, it is better to use the WebSpeed-defined output stream to manage output to a Web page. The standard WebSpeed
PUTstatement directive ({&OUT}) uses the WebSpeed-defined output stream. Each output stream has its own buffer management. Because of this, if you output to more than one stream for a single Web request, the actual sequence of output to the Web page can be unpredictable. It might be different than the sequence specified by the order of output statements in your Web object.Using the WebSpeed-defined output stream
WebSpeed provides two SpeedScript preprocessor definitions to help you use the WebSpeed-defined output stream:
These definitions appear in the
install-path/src/web/method/cgidefs.iinclude file used by all Web objects. Thus, the twoDISPLAYstatements in the following example yield the same result:
Use one of the forms shown in boldface to guarantee that all of your
DISPLAYformatted output appears in the Web page at the corresponding point where the code appears in your Web object.Defining and using a new output stream
To define and use a new output stream, WebSpeed provides two statements:
If you do not specify a stream in the
OUTPUTTOstatement, WebSpeed uses a default unnamed stream to send your output to the Web.The following example defines a new stream and directs it to the Web:
This statement opens the default unnamed stream and directs it to the Web:
Both of these examples use the
DISPLAYstatement directly, sending its output to the Web. However, in the following example, there is no way to guarantee which will appear first in the Web page, the customer name or the customer address:
For more information on the statements used in these examples, see the OpenEdge Development: Progress 4GL Reference .
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |